<%@ page language="java" 
import="it.polimi.swim.entity.SystemUser, it.polimi.swim.entity.Skill,java.util.ArrayList,java.util.List"
contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="myStyle.css">
<title>Edit Profile</title>
</head>
<body>
<div id='header' >
	<div style="float:left"><a href="homeUser.jsp">SWIMv2</a></div>
	<div style="float:right;"><a href="SignoutServlet">Sign out</a></div>
</div>
<div id="content">
<h3>Edit Profile</h3>

	<fieldset class="fieldsetIndex">
<%
SystemUser user= (SystemUser) request.getAttribute("user");


out.println("<form method='post' action='EditProfileServlet'>"); 

out.println("Name <br><input type='text' name='name' value="+user.getName()+"><br>");
out.println("Surname <br><input type='text' name='surname' value="+user.getSurname()+"><br>");
out.println("City <br><input type='text' name='city' value="+user.getCity()+"><br>");
out.println("Password <br><input type='text' name='psw' value="+user.getPsw()+"><br>");

out.println("<br>Date of birth <br>");


//Select day
out.println("<select name='day'>");
for(int i=1; i<32; i++){
	out.println("<option value="+i+">"+i+"</option>");
}
out.println("</select>");

//Select month

out.println("<select name='month'>");
for(int i=1; i<13; i++){
	out.println("<option value="+i+">"+i+"</option>");
}
out.println("</select>");


//Select year
out.println("<select name='year'>");
for(int i=1990; i<2013; i++){
	out.println("<option value="+i+">"+i+"</option>");
}
out.println("</select>");

out.println("<br><br><input type='submit' value='Update'>");
out.println("</form>");
%>
</fieldset>
</div>
</body>
</html>